<?php
use yii\helpers\Url;
use yii\web\View;
use app\assets\SolutionTargetAsset;
SolutionTargetAsset::register($this);
$this->title = $this->context->pageTitle.Yii::$app->params['titleSuffix'];
$this->params['breadcrumbs'] = [
  [
    'label' => \Yii::t('solution', 'Solution'),
    'url' => ['solution-list']
  ],
  \Yii::t('solution', 'Edit PC Solution')
];
$jsMsgs = $this->context->loadJsMsgs([
  'solution'
]);
$this->registerJs("VAM.setVar('LANGUAGE_JS', '".$jsMsgs."');", View::POS_HEAD);
?>
<div class="page-header">
  <h1>
    <?=\Yii::t('solution', 'Solution')?>
    <small><?=\Yii::t('solution', 'Edit PC Solution')?></small>
  </h1>
</div>
<div class="panel panel-default">
  <div class="panel-heading">
    <i class="fa fa-edit"></i>
    <?=\Yii::t('solution', 'Edit PC Solution')?>
    <ul class="list-unstyled pull-right">
      <li>
        <a href="#">
          <i class="fa fa-chevron-up"></i>
        </a>
      </li>
    </ul>
  </div>
  <div class="panel-body">
  <div class="panel-heading">
    <h3 id="strategy_name"><?=$solution['name']?></h3>
  </div>
    <div class="step-container">
      <ul class="step-wrap">
        <li class="step-undone step-done">
          <a href="javascript:void(0);" title="<?=\Yii::t('common', 'Add Label')?>">
            <i class="fa fa-check"></i>
          </a>
          <p><?=\Yii::t('common', 'Add Label')?></p>
        </li>
        <li class="step-undone step-done">
          <a href="javascript:void(0);" title="<?=\Yii::t('common', 'Add Campaign')?>">
            <i class="fa fa-check"></i>
          </a>
          <p><?=\Yii::t('common', 'Add Campaign')?></p>
        </li>
         <li class="step-undone step-active">
          <a href="javascript:void(0);" title="<?=\Yii::t('common', 'Add Solution')?>">
            <i class="fa fa-chevron-right"></i>
          </a>
          <p><?=\Yii::t('common', 'Add Solution')?></p>
        </li>
         <li class="step-undone">
          <a href="javascript:void(0);" title="<?=\Yii::t('common', 'Add Creative')?>">
            <i class="fa fa-chevron-right"></i>
          </a>
          <p><?=\Yii::t('common', 'Add Creative')?></p>
        </li>	
      </ul>
      <div class="step-progress-bar">
        <div class="step-progress" style="width: 66%;"></div>
      </div>
    </div>
    <div class="row">
      <div class="col-sm-12">
        <div class="section-step">
          <ol class="list-inline main-flow">
            <li class="first">
              <a href="<?= Url::to(['solution/pc-solution-basic-edit']);?>?solution_id=<?= $solution['id'] ?>&solution_name=<?= $solution['name']?>" class="cancleFocus">
                <b>①</b>
                <?=\Yii::t('solution', 'Basic')?>
                <span><i class="fa fa-arrow-right"></i></span>
              </a>
            </li>
            <li class="current">
             <a href="<?= Url::to(['solution/pc-solution-target-edit']);?>?solution_id=<?= $solution['id'] ?>&solution_name=<?= $solution['name']?>" class="cancleFocus">
                <b>②</b>
                <?=\Yii::t('solution', 'Condition')?>
                <span><i class="fa fa-arrow-right"></i></span>
              </a>
            </li>
            <li>
              <a href="<?= Url::to(['solution/pc-solution-resource-edit']);?>?solution_id=<?= $solution['id'] ?>&solution_name=<?= $solution['name']?>" class="cancleFocus">
                <b>③</b>
                <?=\Yii::t('solution', 'Resource')?>
                <span><i class="fa fa-arrow-right"></i></span>
              </a>
            </li>
            <li class="last">
              <a href="<?= Url::to(['solution/pc-solution-creative-edit']);?>?solution_id=<?= $solution['id'] ?>&solution_name=<?= $solution['name']?>" class="cancleFocus">
                <b>④</b>
                <?=\Yii::t('solution', 'Creative')?>
              </a>
            </li>
            <li class="pull-right">
              <button class="btn btn-success btn-sm <?php if (!isset($bwList['ConditionChannel']) || $bwList['ConditionChannel'] != 'no_limit') echo 'disabled';?>" id="new-youtu-channel-target" data-status="on">
                <i class="fa fa-plus-circle"></i>
                <?=\Yii::t('solution', 'Add Youtu Channel')?>
              </button>
            </li>
            <li class="pull-right">
              <button class="btn btn-primary btn-sm <?php if (!isset($bwList['ConditionUrl']) || $bwList['ConditionUrl'] != 'no_limit') echo 'disabled';?>"  
			  id="new-letv-url-target" data-status="on">
                <i class="fa fa-plus-circle"></i>
                <?=\Yii::t('solution', 'Add Letv URL')?>
              </button>
            </li>
          </ol>
        </div>
      </div>
    </div>
    <div class="row">
      <div class="col-sm-12">
        <ul id="strategy-target-tab" class="nav nav-tabs nav-justified">
          <li class="active">
            <a href="#time-target" data-target="time-target" data-toggle="tab"><?=\Yii::t('solution', 'Time')?></a>
          </li>
          <li class="">
            <a href="#content-target" data-target="content-target" data-toggle="tab"><?=\Yii::t('solution', 'Content')?></a>
          </li>
          <li class="">
            <a href="#ip-target" data-target="ip-target" data-toggle="tab"><?=\Yii::t('solution', 'IP')?></a>
          </li>
          <li class="">
            <a href="#geo-target" data-target="geo-target" data-toggle="tab"><?=\Yii::t('solution', 'GEO')?></a>
          </li>
          <li class="">
            <a href="#system-target" data-target="system-target" data-toggle="tab"><?=\Yii::t('solution', 'System')?></a>
          </li>
          <li class="">
            <a href="#lang-target" data-target="lang-target" data-toggle="tab"><?=\Yii::t('solution', 'Language')?></a>
          </li>
	  <li class=""> 
            <a href="#brand-safety" data-target="brand-safety" data-toggle="tab"><?=\Yii::t('solution', 'Brand Safe')?></a>
          </li>
          <li class="">
            <a href="#frequency-control" data-target="frequency-control" data-toggle="tab"><?=\Yii::t('solution', 'Frequency')?></a>
          </li>
          <li class="">
            <a href="#weather" data-target="weather" data-toggle="tab"><?=\Yii::t('solution', 'Weather')?></a>
          </li>
          <li>
            <a href="#crowd" data-target="crowd" data-toggle="tab"><?=\Yii::t('solution', 'Audience')?></a>
          </li>
          <!-- <li class="">
            <a href="#retarget" data-target="retarget" data-toggle="tab"><?=\Yii::t('solution', 'Retarget')?></a>
          </li> -->
          <!-- 编辑回显-->
		  <?php
			if(!isset($bwList['ConditionChannel']) || $bwList['ConditionChannel'] != 'no_limit') {
				$channel = \Yii::t('solution', 'Youtu Channel');
				$delete = \Yii::t('solution', 'Click to delete');
				echo <<<FINE
				  <li class="target_nav">
					<a href="#youtu-channel-target" data-target="youtu-channel-target" data-toggle="tab" data-button="new-youtu-channel-target">
					  $channel
					  <button class="btn-link btn-sm youtu-tab-close tab-close" title="$delete">
						<i class="fa fa-times"></i>
					  </button>
					</a>
				  </li>
FINE;
			}
		 ?>
        <!-- letv url-->
		<?php
			if(!isset($bwList['ConditionUrl']) || $bwList['ConditionUrl'] != 'no_limit') {
				$letv = \Yii::t('solution', 'Letv URL');
				$delete = \Yii::t('solution', 'Click to delete');
				echo <<<FINE
				  <li class="target_nav">
					<a href="#letv-url-target" data-target="letv-url-target" data-toggle="tab" data-button="new-letv-url-target">
					  $letv
					  <button class="btn-link btn-sm letv-tab-close tab-close" title="$delete">
						<i class="fa fa-times"></i>
					  </button>
					</a>
				  </li>
FINE;
			}
		 ?>
        </ul>
        <form class="form-horizontal" id="strategy_target_frm" action="<?php echo Url::to(['solution/new-pc-solution-target-handle']);?>" method="POST" role="form">
        <!-- <form class="form-horizontal" id="strategy_target_frm" action="<?= Yii::getAlias('@web').'/response/solution/solutionOk.php';?>" method="POST" role="form"> -->
          <input class="hidden" type="text" name="solution_id" value="<?=$solution['id']?>">
	  <input type="hidden" name="condition_class_type" value="is_for_display">
          <div id="strategy-target-content" class="tab-content">
            <div class="tab-pane fade active in" id="time-target">
              <div class="row">
                <div class="col-sm-12">
                  <div class="time-interval-wrap">
                    <div class="time-interval-content">
                      <div class="time-list">
                        <ul class="list-unstyle list-inline mb0">
                          <li>0:00</li>
                          <li style="margin-left: 18px;">2:00</li>
                          <li style="margin-left: 20px;">4:00</li>
                          <li style="margin-left: 21px;">6:00</li>
                          <li style="margin-left: 22px;">8:00</li>
                          <li style="margin-left: 14px;">10:00</li>
                          <li style="margin-left: 14px;">12:00</li>
                          <li style="margin-left: 14px;">14:00</li>
                          <li style="margin-left: 13px;">16:00</li>
                          <li style="margin-left: 15px;">18:00</li>
                          <li style="margin-left: 14px;">20:00</li>
                          <li style="margin-left: 14px;">22:00</li>
                          <li style="margin-left: 12px;">24:00</li>
                        </ul>
                      </div>
                      <div class="time-select-wrap">
                      </div>
                      <div class="time-operate-list">
                        <div class="button-group">
                          <?=\Yii::t('solution', 'shortcut')?>：
                          <button class="btn btn-success btn-xs launch-all-btn">
                            <?=\Yii::t('solution', 'all day')?>
                          </button>
                          <button class="btn btn-success btn-xs launch-work-btn">
                            <?=\Yii::t('solution', 'weekday')?>
                          </button>
                          <button class="btn btn-success btn-xs launch-weekend-btn">
                            <?=\Yii::t('solution', 'weekend')?>
                          </button>
                          <div class="btn-group" style="margin-left: 270px;">
                            <label class="btn btn-primary btn-sm  btn-label label-on">
                              &nbsp;&nbsp;&nbsp;
                            </label>
                          </div>
                          <?=\Yii::t('solution', 'bid hour')?>
                          <div class="btn-group">
                            <label class="btn btn-primary btn-sm active btn-label label-off">
                              &nbsp;&nbsp;&nbsp;
                            </label>
                          </div>
                          <?=\Yii::t('solution', 'unbid hour')?>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="tab-pane fade" id="content-target">
              <div class="row">
                <div class="col-sm-9">
                  <div class="form-group">
                    <label class="control-label col-sm-4">
                      <?=\Yii::t('solution', 'Target type')?>：
                    </label>
                    <div class="col-sm-8">
                      <label class="radio-inline">
                      <input id="content_black_white_radio" type="radio" name="content.black_white_radio" value="-1" 
		                  <?php  
        	              if ($bwList['ConditionAdspaceCategory'] == 'no_limit')
        	                echo 'checked';
        	            ?> >
                        <?=\Yii::t('solution', 'no limit')?>
                      </label>
                      <label class="radio-inline">
                        <input id="content_black_white_radio" type="radio" name="content.black_white_radio" value="0" 
			                   <?php  
          	              if ($bwList['ConditionAdspaceCategory'] == 'black')
          	                echo 'checked';
          	            ?> >
                        <?=\Yii::t('solution', 'black')?>
                      </label>
                      <label class="radio-inline">
                        <input id="content_black_white_radio" type="radio" name="content.black_white_radio" value="1"
        		            <?php  
        		              if ($bwList['ConditionAdspaceCategory'] == 'white')
        		                echo 'checked';
        		            ?> >
                        <?=\Yii::t('solution', 'white')?>
                      </label>
                    </div>
                  </div>
                  <div class="form-group">
                    <label class="control-label col-sm-4" for="target_content_type">
                      <?=\Yii::t('solution', 'Choose')?>：
                    </label>
                    <div class="col-sm-8">
                      <select class="form-control" id="target_content_type" name="content.type[]" placeholder="<?=\Yii::t('solution', 'Please input keywords')?>" multiple>
                        <option value=""></option>
			<?php 
				$out = '';							
				// selected
				$condition = 'ConditionAdspaceCategory';
				$selected = array_values($conditions[$condition]);
				foreach($adspaceCategory as $key => $cates) {
					$out .= "<optgroup label='$key'>";
					foreach ($cates as $k => $cate) {
						$id = $cate['category_id'];
						$name = $cate['name'];
						$isSelected = '';
						if (in_array($id, $selected)) {
							$isSelected = 'selected';
						}
						$out .= "<option value='$id' $isSelected >$name</option>";
					}
					$out .= '</optgroup>';
				}
				echo $out;
			?>
                      </select>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="tab-pane fade" id="ip-target"> 
              <div class="row">
                <div class="col-sm-9">
                  <div class="form-group">
                    <label class="control-label col-sm-4">
                      <?=\Yii::t('solution', 'Target type')?>：
                    </label>
                    <div class="col-sm-8">
                       <label class="radio-inline">
                      <input id="ip_black_white_radio" type="radio" name="ip.black_white_radio" value="no_limit"
		      <?php  
	              if ($bwList['ConditionIp'] == 'no_limit')
	                echo 'checked';
	            ?> >
                        <?=\Yii::t('solution', 'no limit')?>
                      </label>
                      <label class="radio-inline">
                        <input id="ip_black_white_radio" type="radio" name="ip.black_white_radio" value="black"
			<?php  
		              if ($bwList['ConditionIp'] == 'black')
		                echo 'checked';
		            ?> >
                        <?=\Yii::t('solution', 'black')?>
                      </label>
                      <label class="radio-inline">
                        <input id="ip_black_white_radio" type="radio" name="ip.black_white_radio" value="white"
			<?php  
	              if ($bwList['ConditionIp'] == 'white')
	                echo 'checked';
	            ?> >
                        <?=\Yii::t('solution', 'white')?>
                      </label>
                    </div>
                  </div>
                  <div class="form-group">
                    <label class="control-label col-sm-4" for="target_ip_type">
                      <?=\Yii::t('solution', 'Add IP')?>：
                    </label>
                    <div class="col-sm-6">
                      <div class="row">
                        <div class="col-sm-2 pr0">
                          <input class="form-control target_ip_number" type="text" value="" placeholder="">
                        </div>
                        <div class="col-sm-1">
                          <p class="form-control-static text-center">●</p>
                        </div>
                        <div class="col-sm-2 pr0">
                          <input class="form-control target_ip_number" type="text" value="" placeholder="">
                        </div>
                        <div class="col-sm-1">
                          <p class="form-control-static text-center">●</p>
                        </div>
                        <div class="col-sm-2 pr0"> 
                          <input class="form-control target_ip_number" type="text" value="" placeholder="">
                        </div>
                        <div class="col-sm-1">
                          <p class="form-control-static text-center">●</p>
                        </div>
                        <div class="col-sm-2 pr0">
                          <input class="form-control target_ip_number" type="text" value="" placeholder="">
                        </div>
                      </div>
                      <div class="row">
                        <p class="text-center"><?=\Yii::t('solution', 'to')?></p>
                      </div>
                      <div class="row">
                        <div class="col-sm-2 pr0">
                          <input class="form-control target_ip_number" type="text" value="" placeholder="">
                        </div>
                        <div class="col-sm-1">
                          <p class="form-control-static text-center">●</p>
                        </div>
                        <div class="col-sm-2 pr0">
                          <input class="form-control target_ip_number" type="text" value="" placeholder="">
                        </div>
                        <div class="col-sm-1">
                          <p class="form-control-static text-center">●</p>
                        </div>
                        <div class="col-sm-2 pr0"> 
                          <input class="form-control target_ip_number" type="text" value="" placeholder="">
                        </div>
                        <div class="col-sm-1">
                          <p class="form-control-static text-center">●</p>
                        </div>
                        <div class="col-sm-2 pr0">
                          <input class="form-control target_ip_number" type="text" value="" placeholder="">
                        </div>
                        <div class="col-sm-12">
                          <div class="help-block text-error mb0" id="target_ip_number_err"></div>                          
                        </div>
                      </div>
                      <div class="row">
                        <div class="col-sm-12">
                          <div class="help-block"><?=\Yii::t('solution', 'If you want to set up only one IP, please write the same value in the start and end')?></div>
                          <div class="help-block text-error mb0" id="target_ip_number_err"></div>
                        </div> 
                      </div>
                    </div>
                    <div class="col-sm-2">
                      <button class="btn btn-primary" id="target_ip_op" type="button">
                        <i class="fa fa-plus-circle"></i>
                        <?=\Yii::t('solution', 'Add IP')?>
                       </button>
                    </div>
                  </div>
                  <div class="form-group">
                    <label class="control-label col-sm-4" for="target_ip_filter">
                      <?=\Yii::t('solution', 'IP list')?>：
                    </label>
                    <div class="col-sm-8">
                      <input id="target_ip_list" type="hidden"  name="condition_ips[]" value="<?php
						$condition = 'ConditionIp';
						$ipLists = [];
						foreach ($conditions[$condition] as $pair) {
							$ipLists[] = long2ip($pair['start_ip']).' - '.long2ip($pair['end_ip']);
						}
						echo implode(',', $ipLists);
					  ?>">
                      <table class="table table-hover table-striped table-bordered table-condensed" id="target_ip_table">
                        <thead>
                          <tr>
                            <th><?=\Yii::t('solution', 'IP section')?></th>
                            <th><?=\Yii::t('solution', 'operate')?></th>
                          </tr>
                        </thead>
                        <tbody>
                          <tr>
                            <td class="text-center" colspan="2"><?=\Yii::t('solution', 'No record')?></td>
                          </tr>
                        </tbody>
                      </table>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="tab-pane fade" id="geo-target"> 
              <div class="row">
                <div class="col-sm-9">
                  <div class="form-group">
                    <label class="control-label col-sm-4">
                      <?=\Yii::t('solution', 'Target type')?>：
                    </label>
                    <div class="col-sm-8 pl0">
                      <label class="radio-inline">
                        <input type="radio" name="geo.black_white_radio" value="no_limit"
			<?php  
			      if ($bwList['ConditionZone'] == 'no_limit')
			        echo 'checked';
			    ?> >
                        <?=\Yii::t('solution', 'no limit')?>
                      </label>
                      <label class="radio-inline">
                        <input type="radio" name="geo.black_white_radio" value="black"
			<?php  
		              if ($bwList['ConditionZone'] == 'black')
		                echo 'checked';
		            ?> >
                        <?=\Yii::t('solution', 'black')?>
                      </label>
                      <label class="radio-inline">
                        <input type="radio" name="geo.black_white_radio" value="white"
			<?php  
		              if ($bwList['ConditionZone'] == 'white')
		                echo 'checked';
		            ?> >
                        <?=\Yii::t('solution', 'white')?>
                      </label>
                    </div>
                  </div>
                  <div class="form-group">
                    <div class="col-sm-8 col-sm-offset-4 pl0">
                      <label class="checkbox-inline">
                        <input id="geo_black_white_all" type="checkbox" value="all"
			<?php
				$geos = $conditions['ConditionZone'];
				$geos = array_pop($geos);

				$checked = 'checked';
				$allCity = [];
				foreach ($cityRank as $rank => $cities) {
					$allCity = array_merge($allCity, $cities);
				}
				count($allCity) == 0 && $checked = '';
				foreach ($allCity as $city) {
					if (stripos($geos, $city) === false) {
						$checked = '';
						break;
					}
				}
				echo $checked;
			?>
			 >
			
                        <?=\Yii::t('solution', 'Check All/Inverse')?>
                      </label>
                    </div>
                  </div>
                </div>
              </div>
              <div class="row">
                <div class="col-sm-9">
                  <div class="form-group">
                    <label class="col-sm-4 control-label">
                      <?=\Yii::t('solution', 'Geo list')?>：
                    </label>
                    <div class="col-sm-8">
                      <section class="geo-wrap">
                        <div class="geo-interval-wrap">
                          <div class="row">
                            <div class="col-sm-2 pd0">
                              <label class="checkbox-inline">
                                <input type="checkbox" class="ckb-all" <?php
									$geos = $conditions['ConditionZone'];
									$geos = array_pop($geos);

									$checked = 'checked';
									$allCity = [];
									foreach ($cityRank as $rank => $cities) {
										$allCity = array_merge($allCity, $cities);
									}
									count($allCity) == 0 && $checked = '';
									foreach ($allCity as $city) {
										if (stripos($geos, $city) === false) {
											$checked = '';
											break;
										}
									}
									echo $checked;
								?>
								 >中国</label>
                            </div>
                          </div>
                          <div class="row rank-two">
                            <div class="col-xs-2 pd0">
                              <label class="checkbox-inline ">
                                <input type="checkbox" class="ckb-rank-all"
				<?php
					$geos = $conditions['ConditionZone'];
					$geos = array_pop($geos);

					$checked = 'checked';
					$group = $cityRank['一线城市'];
					foreach ($group as $city) {
						if (stripos($geos, $city) === false) {
							$checked = '';
							break;
						}
					}
					echo $checked;
				?>
				 >一线城市：</label>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNBJ0000">                  
                                <label class="">北京</label>
                              </div>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNSH0000" >                  
                                <label class="">上海</label>
                              </div>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNGDSZ00" >                  
                                <label class="">深圳</label>
                              </div>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNGDGZ00" >                  
                                <label class="">广州</label>
                              </div>
                            </div>
                          </div>
                          <div class="row rank-two">
                            <div class="col-xs-2 pd0">
                              <label class="checkbox-inline ">
                                <input type="checkbox" class="ckb-rank-all" 
								<?php
									$geos = $conditions['ConditionZone'];
									$geos = array_pop($geos);

									$checked = 'checked';
									$group = $cityRank['华北地区'];
									foreach ($group as $city) {
										if (stripos($geos, $city) === false) {
											$checked = '';
											break;
										}
									}
									echo $checked;
								?>
								>华北地区：</label>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNTJ0000" >                  
                                <label class="">天津</label>
                              </div>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNHE0000">                  
                                <label class="">河北</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHESJ00">石家庄</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHEBD00">保定</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHEHD00">邯郸</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHELF00">廊坊</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHETS00">唐山</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHEHS00">衡水</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHEZJ00">张家口</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHEQH00">秦皇岛</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHEXT00">邢台</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHECD00">承德</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHECZ00">沧州</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                            <div class="col-xs-2 pr0">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNNM0000">                  
                                <label class="">内蒙古</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNNMCF00">赤峰</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNNMEE00">鄂尔多斯</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNNMWM00">乌兰察布</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNNMBY00">巴彦淖尔</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNNMWH00">乌海</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNNMBT00">包头</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNNMXL00">锡林郭勒盟</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNNMAL00">阿拉善盟</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNNMHH00">呼和浩特</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNNMXA00">兴安盟</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNNMHL00">呼伦贝尔</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNNMTL00">通辽</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNSX0000">                  
                                <label class="">山西</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSXTY00">太原</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSXDT00">大同</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSXCZ00">长治</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSXQZ00">忻州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSXJZ00">晋中</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSXLF00">临汾</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSXYC00">运城</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSXJC00">晋城</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSXSZ00">朔州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSXYQ00">阳泉</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSXLL00">吕梁</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                          </div>
                          <div class="row rank-two">
                            <div class="col-xs-2 pd0">
                              <label class="checkbox-inline ">
                                <input type="checkbox" class="ckb-rank-all" 
								<?php
									$geos = $conditions['ConditionZone'];
									$geos = array_pop($geos);

									$checked = 'checked';
									$group = $cityRank['东北地区'];
									foreach ($group as $city) {
										if (stripos($geos, $city) === false) {
											$checked = '';
											break;
										}
									}
									echo $checked;
								?>
								 >东北地区：</label>
                            </div>
                            <div class="col-xs-2 pr0">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNHL0000">                  
                                <label class="">黑龙江</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHLHG00">鹤岗</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHLHE00">哈尔滨</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHLMD00">牡丹江</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHLSH00">绥化</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHLQQ00">齐齐哈尔</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHLSY00">双鸭山</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHLJX00">鸡西</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHLDQ00">大庆</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHLJM00">佳木斯</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHLHH00">黑河</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHLQT00">七台河</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHLYC00">伊春</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHLDX00">大兴安岭</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNJL0000">                  
                                <label class="">吉林</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJLCC00">长春</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJLJL00">吉林</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJLSP00">四平</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJLLY00">辽源</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJLYJ00">延边</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJLTH00">通化</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJLSY00">松原</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJLBS00">白山</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJLBC00">白城</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNLN0000">                  
                                <label class="">辽宁</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNLNDL00">大连</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNLNSY00">沈阳</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNLNPJ00">盘锦</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNLNAS00">鞍山</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNLNCY00">朝阳</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNLNJZ00">锦州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNLNTL00">铁岭</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNLNDD00">丹东</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNLNBX00">本溪</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNLNYK00">营口</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNLNFS00">抚顺</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNLNFX00">阜新</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNLNLY00">辽阳</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNLNJX00">葫芦岛</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                          </div>
                          <div class="row rank-two">
                            <div class="col-xs-2 pd0">
                              <label class="checkbox-inline ">
                                <input type="checkbox" class="ckb-rank-all" 
								<?php
									$geos = $conditions['ConditionZone'];
									$geos = array_pop($geos);

									$checked = 'checked';
									$group = $cityRank['华东地区'];
									foreach ($group as $city) {
										if (stripos($geos, $city) === false) {
											$checked = '';
											break;
										}
									}
									echo $checked;
								?>
								 >华东地区：</label>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNJS0000">                  
                                <label class="">江苏</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJSNJ00">南京</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJSCZ00">常州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJSSZ00">苏州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJSWX00">无锡</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJSXZ00">徐州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJSLY00">连云港</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJSYZ00">扬州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJSSQ00">宿迁</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJSHA00">淮安</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJSTZ00">泰州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJSNT00">南通</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJSYC00">盐城</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJSZJ00">镇江</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNZJ0000">                  
                                <label class="">浙江</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNZJHZ00">杭州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNZJJH00">金华</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNZJLS00">丽水</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNZJWZ00">温州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNZJTZ00">台州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNZJQZ00">衢州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNZJNB00">宁波</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNZJJX00">嘉兴</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNZJSX00">绍兴</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNZJHU00">湖州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNZJZS00">舟山</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNAH0000">                  
                                <label class="">安徽</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNAHCZ00">滁州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNAHHF00">合肥</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNAHHZ00">亳州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNAHHN00">淮南</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNAHAQ00">安庆</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNAHLA00">六安</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNAHSZ00">宿州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNAHWH00">芜湖</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNAHMA00">马鞍山</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNAHXC00">宣城</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNAHHS00">黄山</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNAHCO00">池州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNAHCH00">巢湖</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNAHHB00">淮北</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNAHFY00">阜阳</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNAHTL00">铜陵</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNAHBB00">蚌埠</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNFJ0000">                  
                                <label class="">福建</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNFJFZ00">福州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNFJNP00">南平</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNFJQZ00">泉州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNFJPT00">莆田</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNFJXM00">厦门</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNFJND00">宁德</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNFJZZ00">漳州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNFJSM00">三明</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNFJLY00">龙岩</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNJX0000">                  
                                <label class="">江西</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJXNC00">南昌</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJXJJ00">九江</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJXJD00">景德镇</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJXPX00">萍乡</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJXXY00">新余</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJXYC00">宜春</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJXJA00">吉安</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJXYT00">鹰潭</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJXFZ00">抚州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJXSR00">上饶</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNJXGZ00">赣州</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNSD0000">                  
                                <label class="">山东</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSDJN00">济南</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSDWF00">潍坊</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSDQD00">青岛</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSDYT00">烟台</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSDZB00">淄博</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSDLC00">聊城</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSDLW00">莱芜</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSDLY00">临沂</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSDJI00">济宁</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSDTA00">泰安</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSDBZ00">滨州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSDDY00">东营</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSDWH00">威海</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSDHZ00">菏泽</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSDDZ00">德州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSDZZ00">枣庄</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSDRZ00">日照</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                          </div>
                          <div class="row rank-two">
                            <div class="col-xs-2 pd0">
                              <label class="checkbox-inline ">
                                <input type="checkbox" class="ckb-rank-all"  
								<?php
									$geos = $conditions['ConditionZone'];
									$geos = array_pop($geos);

									$checked = 'checked';
									$group = $cityRank['华中地区'];
									foreach ($group as $city) {
										if (stripos($geos, $city) === false) {
											$checked = '';
											break;
										}
									}
									echo $checked;
								?>
								 >华中地区：</label>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNHA0000">                  
                                <label class="">河南</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHAZZ00">郑州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHALY00">洛阳</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHAPD00">平顶山</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHAZM00">驻马店</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHAKF00">开封</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHAAY00">安阳</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHAXX00">新乡</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHAJZ00">焦作</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHAPY00">濮阳</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHASM00">三门峡</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHAXC00">许昌</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHASQ00">商丘</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHANY00">南阳</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHAXY00">信阳</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHAHB00">鹤壁</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHALH00">漯河</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHAZK00">周口</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNHB0000">                  
                                <label class="">湖北</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHBWH00">武汉</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHBJZ00">荆州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHBYC00">宜昌</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHBXF00">襄樊</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHBXG00">孝感</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHBHG00">黄冈</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHBHS00">黄石</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHBXN00">咸宁</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHBJM00">荆门</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHBSY00">十堰</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHBEZ00">鄂州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHBSZ00">随州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHBES00">恩施</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNHN0000">                  
                                <label class="">湖南</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHNCS00">长沙</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHNHY00">衡阳</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHNZZ00">株洲</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHNCZ00">郴州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHNYY00">岳阳</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHNSY00">邵阳</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHNLD00">娄底</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHNYZ00">永州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHNXT00">湘潭</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHNCD00">常德</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHNHH00">怀化</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHNIY00">益阳</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHNXX00">湘西</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHNZJ00">张家界</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                          </div>
                          <div class="row rank-two">
                            <div class="col-xs-2 pd0">
                              <label class="checkbox-inline ">
                                <input type="checkbox" class="ckb-rank-all" 
								<?php
									$geos = $conditions['ConditionZone'];
									$geos = array_pop($geos);

									$checked = 'checked';
									$group = $cityRank['华南地区'];
									foreach ($group as $city) {
										if (stripos($geos, $city) === false) {
											$checked = '';
											break;
										}
									}
									echo $checked;
								?>
								 >华南地区：</label>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNGD0000">                  
                                <label class="">广东</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGDZQ00">肇庆</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGDHZ00">惠州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGDYJ00">阳江</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGDMM00">茂名</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGDZJ00">湛江</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGDZS00">中山</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGDZH00">珠海</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGDJM00">江门</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGDDG00">东莞</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGDQY00">清远</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGDJY00">揭阳</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGDST00">汕头</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGDFS00">佛山</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGDMZ00">梅州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGDSG00">韶关</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGDHY00">河源</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGDSW00">汕尾</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGDYF00">云浮</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGDCZ00">潮州</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNGX0000">                  
                                <label class="">广西</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGXNN00">南宁</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGXGL00">桂林</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGXLZ00">柳州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGXYL00">玉林</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGXHZ00">贺州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGXGG00">贵港</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGXHC00">河池</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGXFC00">防城港</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGXBH00">北海</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGXBS00">百色</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGXQZ00">钦州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGXWZ00">梧州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGXLB00">来宾</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGXCZ00">崇左</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNHI0000">                  
                                <label class="">海南</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHIHK00">海口</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNHISY00">三亚</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                          </div>
                          <div class="row rank-two">
                            <div class="col-xs-2 pd0">
                              <label class="checkbox-inline ">
                                <input type="checkbox" class="ckb-rank-all" 
								<?php
									$geos = $conditions['ConditionZone'];
									$geos = array_pop($geos);

									$checked = 'checked';
									$group = $cityRank['西南地区'];
									foreach ($group as $city) {
										if (stripos($geos, $city) === false) {
											$checked = '';
											break;
										}
									}
									echo $checked;
								?>
								 >西南地区：</label>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNCQ0000">                  
                                <label class="">重庆</label>
                              </div>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNGZ0000">                  
                                <label class="">贵州</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGZGY00">贵阳</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGZQN00">黔南</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGZTR00">铜仁</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGZBJ00">毕节</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGZZY00">遵义</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGZLP00">六盘水</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGZQX00">黔西南</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGZQD00">黔东南</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGZAS00">安顺</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNSC0000">                  
                                <label class="">四川</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSCLZ00">泸州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSCCD00">成都</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSCMY00">绵阳</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSCSN00">遂宁</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSCBZ00">巴中</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSCNJ00">内江</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSCNC00">南充</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSCDY00">德阳</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSCGY00">广元</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSCLS00">乐山</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSCGA00">广安</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSCZY00">资阳</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSCXC00">凉山</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSCZG00">自贡</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSCYB00">宜宾</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSCPZ00">攀枝花</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSCDZ00">达州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSCYA00">雅安</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSCMS00">眉山</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSCGZ00">甘孜</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNSCAB00">阿坝</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNYN0000">                  
                                <label class="">云南</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNYNKM00">昆明</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNYNXS00">西双版纳</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNYNWS00">文山</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNYNNJ00">怒江</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNYNLC00">临沧</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNYNZT00">昭通</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNYNBS00">保山</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNYNDL00">大理</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNYNYX00">玉溪</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNYNQJ00">曲靖</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNYNCX00">楚雄</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNYNDH00">德宏</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNYNHH00">红河</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNYNLJ00">丽江</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNYNSM00">普洱</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNYNDQ00">迪庆</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNXZ0000">                  
                                <label class="">西藏</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXZLS00">拉萨</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXZRG00">日喀则</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXZSN00">山南</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXZLZ00">林芝</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXZCD00">昌都</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXZNQ00">那曲</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXZAL00">阿里</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                          </div>
                          <div class="row rank-two">
                            <div class="col-xs-2 pd0">
                              <label class="checkbox-inline ">
                                <input type="checkbox" class="ckb-rank-all" 
								<?php
									$geos = $conditions['ConditionZone'];
									$geos = array_pop($geos);

									$checked = 'checked';
									$group = $cityRank['西北地区'];
									foreach ($group as $city) {
										if (stripos($geos, $city) === false) {
											$checked = '';
											break;
										}
									}
									echo $checked;
								?>
								 >西北地区：</label>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNXA0000">                  
                                <label class="">陕西</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXAXA00">西安</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXAWN00">渭南</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXAHZ00">汉中</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXASL00">商洛</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXAAK00">安康</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXAYL00">榆林</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXABJ00">宝鸡</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXAYA00">延安</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXAXY00">咸阳</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXATC00">铜川</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNGS0000">                  
                                <label class="">甘肃</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGSDX00">定西</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGSTS00">天水</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGSLZ00">兰州</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGSLN00">陇南</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGSGN00">甘南</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGSLX00">临夏</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGSBY00">白银</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGSPL00">平凉</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGSJC00">金昌</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGSWW00">武威</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGSJQ00">酒泉</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGSJY00">嘉峪关</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGSQY00">庆阳</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNGSZY00">张掖</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNNX0000">                  
                                <label class="">宁夏</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNNXYC00">银川</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNNXSZ00">石嘴山</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNNXWZ00">吴忠</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNNXGY00">固原</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNNXZW00">中卫</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNQH0000">                  
                                <label class="">青海</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNQHXN00">西宁</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNQHHX00">海西</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNQHHD00">海东</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNQHHB00">海北</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNQHHN00">海南</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNQHHH00">黄南</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNQHGL00">果洛</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNQHYS00">玉树</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNXJ0000">                  
                                <label class="">新疆</label>
                              </div>
                              <div class="popover bottom" style="">
                                <div class="arrow"></div>
                                <div class="popover-content">
                                  <ul class="list-unstyled list-inline">
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXJWL00">乌鲁木齐</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXJKE00">克孜勒苏柯尔克孜</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXJKS00">喀什</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXJHT00">和田</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXJBY00">巴音郭楞</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXJEK00">阿克苏</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXJBE00">博尔塔拉</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXJTC00">塔城</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXJYL00">伊犁</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXJCJ00">昌吉</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXJHM00">哈密</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXJTL00">吐鲁番</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXJKL00">克拉玛依</label>
                                      </div>
                                    </li>
                                    <li>
                                      <div class="checkbox">
                                        <label>
                                          <input type="checkbox" name="geo[]" value="CNXJAL00">阿勒泰</label>
                                      </div>
                                    </li>
                                  </ul>
                                </div>
                              </div>
                            </div>
                          </div>
                          <div class="row rank-two">
                            <div class="col-xs-2 pd0">
                              <label class="checkbox-inline ">
                                <input type="checkbox" class="ckb-rank-all" 
								<?php
									$geos = $conditions['ConditionZone'];
									$geos = array_pop($geos);

									$checked = 'checked';
									$group = $cityRank['港澳台'];
									foreach ($group as $city) {
										if (stripos($geos, $city) === false) {
											$checked = '';
											break;
										}
									}
									echo $checked;
								?>
								 >港澳台：</label>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNHK0000">                  
                                <label class="">香港</label>
                              </div>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNMO0000">                  
                                <label class="">澳门</label>
                              </div>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="CNTW0000">                  
                                <label class="">台湾</label>
                              </div>
                            </div>
                          </div>
                          <div class="row rank-two">
                            <div class="col-xs-2 pd0">
                              <label class="checkbox-inline ">
                                <input type="checkbox" class="ckb-rank-all" 
								<?php
									$geos = $conditions['ConditionZone'];
									$geos = array_pop($geos);

									$checked = 'checked';
									$group = $cityRank['其它地区'];
									foreach ($group as $city) {
										if (stripos($geos, $city) === false) {
											$checked = '';
											break;
										}
									}
									echo $checked;
								?>
								 >其它地区：</label>
                            </div>
                            <div class="col-xs-2">
                              <div class="geo-eles checkbox-inline">
                                <input type="checkbox" class="" name="geo[]" value="AU000000,JP000000,TH000000,IN000000,MY000000,KR000000,PH000000,VN000000,FR000000,SE000000,IT000000,DE000000,GR000000,ES000000,AT000000,GB000000,NL000000,AE000000,IL000000,UA000000,CZ000000,RU000000,KZ000000,PT000000,SA000000,DK000000,IR000000,NO000000,US000000,CA000000,MX000000,SY000000,CY000000,CH000000,IQ000000,TR000000,RO000000,LB000000,HU000000,GE000000,AZ000000,PS000000,LT000000,OM000000,RS000000,FI000000,BE000000,BG000000,SI000000,MD000000,MK000000,EE000000,LI000000,HR000000,PL000000,BA000000,LV000000,JO000000,KG000000,IE000000,LY000000,AM000000,YE000000,BY000000,GI000000,LU000000,SK000000,MT000000,PR000000,VI000000,BO000000,NZ000000,SG000000,ID000000,NP000000,PK000000,BS000000,VC000000,CL000000,AR000000,DM000000,BD000000,TK000000,KH000000,PG000000,MV000000,NC000000,FJ000000,MN000000,WF000000,QA000000,IS000000,AL000000,SL000000,JE000000,SM000000,AX000000,AD000000,BH000000,FO000000,GL000000,GG000000,VA000000,IM000000,KW000000,MC000000,ME000000,TJ000000,TM000000,UZ000000,BR000000,BZ000000,ZA000000,EG000000,ZW000000,LR000000,KE000000,NG000000,GH000000,TZ000000,ZM000000,SN000000,MG000000,AO000000,NA000000,CI000000,SD000000,CM000000,MW000000,GA000000,ML000000,BJ000000,TD000000,BW000000,CV000000,RW000000,CD000000,UG000000,MZ000000,GM000000,LS000000,MU000000,DZ000000,GN000000,BF000000,SO000000,NE000000,CF000000,SZ000000,TG000000,BI000000,SC000000,MA000000,MR000000,DJ000000,CG000000,KM000000,RE000000,GQ000000,TN000000,NI000000,CR000000,PA000000,CU000000,KY000000,JM000000,VG000000,CO000000,GT000000,MH000000,PE000000,AQ000000,BM000000,BB000000,AW000000,AI000000,KN000000,GD000000,DO000000,PY000000,LC000000,MS000000,VE000000,TC000000,AG000000,TV000000,PF000000,SB000000,VU000000,AF000000,ER000000,TT000000,HT000000,EC000000,SH000000,FM000000,SV000000,HN000000,UY000000,LK000000,EH000000,CX000000,LA000000,IO000000,GU000000,WS000000,SR000000,CK000000,KI000000,NU000000,TO000000,TF000000,MQ000000,YT000000,NF000000,BN000000,AS000000,SJ000000,BT000000,BV000000,CC000000,ET000000,FK000000,GF000000,GP000000,GS000000,GW000000,GY000000,UM000000,PW000000,MP000000,PM000000,MF000000,MM000000,NR000000,SS000000,KP000000,ST000000,BQ000000">                  
                                <label class="">其它</label>
                              </div>
                            </div>
                          </div>
                        </div>
                      </section>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="tab-pane fade" id="system-target"> 
              <div class="row">
                <div class="col-sm-9">
                  <div class="form-group">
                    <label class="control-label col-sm-4">
                      <?=\Yii::t('solution', 'Target type')?>：
                    </label>
                    <div class="col-sm-8">
                      <label class="radio-inline">
                        <input id="system_black_white_radio" type="radio" name="system.black_white_radio" value="no_limit" checked>
                        <?=\Yii::t('solution', 'no limit')?>
                      </label>
                      <label class="radio-inline">
                        <input id="system_black_white_radio" type="radio" name="system.black_white_radio" value="black"
			<?php  
				if ($bwList['ConditionInstrument'] == 'black')
					echo 'checked';
			?> >
                        <?=\Yii::t('solution', 'black')?>
                      </label>
                      <label class="radio-inline">
                        <input id="system_black_white_radio" type="radio" name="system.black_white_radio" value="white"
			<?php  
							if ($bwList['ConditionInstrument'] == 'white')
								echo 'checked';
						?> >
                        <?=\Yii::t('solution', 'white')?>
                      </label>
                    </div>
                  </div>
                  <div class="form-group">
                    <div class="col-sm-8 col-sm-offset-4">
                      <label class="checkbox-inline">
                        <input id="system_black_white_all" type="checkbox" value="all"<?php 
						$condition = 'ConditionInstrument';
						$checked = $conditions[$condition];
						if ($checked == ['1', '6', '11']) echo 'checked'; ?> >
                        <?=\Yii::t('solution', 'Check All/Inverse')?>
                      </label>
                    </div>
                  </div>
                  <div class="form-group">
                    <label class="control-label col-sm-4">
                      <?=\Yii::t('solution', 'Instruments List')?>：
                    </label>          
          <div class="col-sm-8 system-target-wrap pl0">
          <?php
            $out = '';
	    $condition = 'ConditionInstrument';
	    $checked = $conditions[$condition];
            foreach($topInstruments as $pid => $parent) {
              $pname = $parent['description'];
	      $isChecked = '';
		if (in_array($pid, $checked)) {
			$isChecked = 'checked';
		}
              $out .=<<< FINE
                
            <div class="col-sm-10">
              <label class="control-label">
                <input id="lang_black_white_radio" type="checkbox" name="instrument.devices[]" value="$pid" $isChecked> $pname
              </label>
            </div>
FINE;
              
              foreach($instruments[$pname] as $key => $instrument) {
                $cname = $instrument['description'];
                $out .= <<<FINE
                <div class="col-sm-4">
                  <label class="checkbox-inline">
                  $cname
                  </label>
                </div>
FINE;
              }
            }
            echo $out;
          ?>
                    </div>
                  </div>          
                </div>
              </div>
            </div>
            <div class="tab-pane fade" id="lang-target"> 
              <div class="row">
                <div class="col-sm-9">
                  <div class="form-group">
                    <label class="control-label col-sm-4">
                      <?=\Yii::t('solution', 'Target type')?>：
                    </label>
                    <div class="col-sm-8">
                      <label class="radio-inline">
                        <input id="lang_black_white_radio" type="radio" name="lang.black_white_radio" value="no_limit"
			<?php  
	              if ($bwList['ConditionLanguage'] == 'no_limit')
	                echo 'checked';
	            ?> > 
                        <?=\Yii::t('solution', 'no limit')?>
                      </label>
                      <label class="radio-inline">
                        <input id="lang_black_white_radio" type="radio" name="lang.black_white_radio" value="black" 
			<?php  
		              if ($bwList['ConditionLanguage'] == 'black')
		                echo 'checked';
		            ?> >
                        <?=\Yii::t('solution', 'black')?>
                      </label>
                      <label class="radio-inline">
                        <input id="lang_black_white_radio" type="radio" name="lang.black_white_radio" value="white"
			<?php  
		              if ($bwList['ConditionLanguage'] == 'white')
		                echo 'checked';
		            ?> > 
                        <?=\Yii::t('solution', 'white')?>
                      </label>
                    </div>
                  </div>
                  <div class="form-group">
                    <div class="col-sm-8 col-sm-offset-4">
                      <label class="checkbox-inline">
                        <input id="lang_black_white_all" type="checkbox" name="lang.black_white_radio" <?php $condition = 'ConditionLanguage'; if (['zh', 'en'] == $conditions[$condition]) {
									echo 'checked';
								} ?> >
                        <?=\Yii::t('solution', 'Check All/Inverse')?>
                      </label>
                    </div>
                  </div>
                  <div class="form-group">
                    <label class="control-label col-sm-4">
                      <?=\Yii::t('solution', 'Language list')?>：
                    </label>
                    <div class="col-sm-8 lang-target-wrap">
                      <div class="row">
            		<div class="col-sm-4">
                          <label class="checkbox-inline">
                            <input id="lang_black_white_radio" type="checkbox" name="lang.language_radio[]" value="zh"
			    <?php
					$condition = 'ConditionLanguage';
					if (in_array('zh', $conditions[$condition])) {
						echo 'checked';
					}
				?> >
                            <?=\Yii::t('solution', 'Chinese')?>(zh)
                          </label>
                        </div>
                        <div class="col-sm-4">
                          <label class="checkbox-inline">
                            <input id="lang_black_white_radio" type="checkbox" name="lang.language_radio[]" value="en"
			    <?php
								$condition = 'ConditionLanguage';
								if (in_array('en', $conditions[$condition])) {
									echo 'checked';
								}
							?> >
                            <?=\Yii::t('solution', 'English')?>(en)
                          </label>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="tab-pane fade" id="brand-safety"> 
              <div class="row">
                <div class="col-sm-9">
                  <div class="form-group">
                    <label class="control-label col-sm-4">
                      <?=\Yii::t('solution', 'Target type')?>：
                    </label>
                    <div class="col-sm-8">
                      <label class="radio-inline">
                        <input id="brand_black_white_radio" type="radio" name="brand.black_white_radio" value="no_limit" 
			<?php  
              if ($bwList['ConditionBrand'] == 'no_limit')
                echo 'checked';
            ?> > 
                        <?=\Yii::t('solution', 'no limit')?>
                      </label>
                      <label class="radio-inline">
                        <input id="brand_black_white_radio" type="radio" name="brand.black_white_radio" value="black"
			<?php  
              if ($bwList['ConditionBrand'] == 'black')
                echo 'checked';
            ?> >  
                        <?=\Yii::t('solution', 'black')?>
                      </label>
                      <label class="radio-inline">
                        <input id="brand_black_white_radio" type="radio" name="brand.black_white_radio" value="white"
			<?php  
              if ($bwList['ConditionBrand'] == 'white')
                echo 'checked';
            ?> >  
                        <?=\Yii::t('solution', 'white')?>
                      </label>
                    </div>
                  </div>
                  <div class="form-group">
                    <label class="control-label col-sm-4" for="target_brand_type">
                      <?=\Yii::t('solution', 'Add URL')?>：
                    </label>
                    <div class="col-sm-8">
                      <div class="input-group">
                        <input class="form-control" id="target_brand_type" type="text" value="" placeholder="<?=\Yii::t('solution', 'Please input keywords')?>">
                        <span class="input-group-btn">
                          <button class="btn btn-primary" id="brand-add-btn" type="button">
                            <i class="fa fa-plus-circle"></i>
                            <?=\Yii::t('solution', 'Add URL')?>
                          </button>
                        </span>
                      </div>
                      <div class="help-block text-error" id="target_brand_type_err"></div>
                      <div class="help-block"><?=\Yii::t('solution', 'Input main or second host, for example, baidu.com for http://www.baidu.com and input sina.com.cn for http://www.sina.com.cn, likewise.')?></div>
                    </div>
                  </div>
                  <div class="form-group">
                    <label class="control-label col-sm-4" for="target_brand_filter">
                      <?=\Yii::t('solution', 'URL List')?>：
                    </label>
                    <div class="col-sm-8">
                      <!-- <textarea class="form-control" id="target_brand_filter" name="brands[]" cols="30" rows="10" readonly></textarea> -->
                      <input id="target_brand_list" type="hidden"  name="brands[]" value="<?php 
						$condition = 'ConditionBrand';
						echo implode(',', $conditions[$condition]);
					  ?>">
                      <table class="table table-hover table-striped table-bordered table-condensed" id="target_brand_table">
                        <thead>
                          <tr>
                            <th><?=\Yii::t('solution', 'URL')?></th>
                            <th><?=\Yii::t('solution', 'Action')?></th>
                          </tr>
                        </thead>
                        <tbody>
                          <tr>
                            <td class="text-center" colspan="2"><?=\Yii::t('solution', 'No Records')?></td>
                          </tr>
                        </tbody>
                      </table>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="tab-pane fade" id="frequency-control"> 
              <div class="row">
                <div class="col-sm-9">
                  <div class="form-group">
                    <label class="control-label col-sm-4">
                      <?=\Yii::t('solution', 'No frequency')?>：
                    </label>
                    <div class="col-sm-8">
                      <label class="radio-inline">
                        <input id="frequency_black_white_radio" type="radio" name="frequency.mode" value="0" <?php  
							if ($bwList['ConditionFrequency'] == 'black' || $bwList['ConditionFrequency'] == 'no_limit')
								echo 'checked';
						?> >
                        <span style="visibility: hidden;">frequency-control</span>
                      </label>
                    </div>
                  </div>
                  <div class="form-group">
                    <label class="control-label col-sm-4">
                      <?=\Yii::t('solution', 'Frequency')?>：
                    </label>
                    <div class="col-sm-2 pr0">
                      <label class="radio-inline">
                      	<input id="frequency_black_white_radio" type="radio" name="frequency.mode" value="3" 
                        <?php  
            							if ($bwList['ConditionFrequency'] == 'white')
            								echo 'checked';
            						?> >
                        <?=\Yii::t('solution', 'Creative On Each Person')?>
                      </label>
                    </div>
                    <div class="col-sm-2">
                      <select class="form-control"id="frequency_setting" name="frequency.person_frequency_id" >
                      <?php 
                        $out = '';
                    		$condition = 'ConditionFrequency';
                    		$frequency = $conditions[$condition];
                        foreach ($frequencyTypes as $k => $f) {
                          $id = $f['id'];
                          $title = $f['name'];
                      		$isSelected = '';
                      		if (isset($frequency[0]) && $frequency[0]['mode'] == 3) {
                      			if ($id == $frequency[0]['frequency_type_id']) {
                      				$isSelected = 'selected';
                      			}
                    		}
                          $out .= "<option value='$id' $isSelected>$title</option>";
                        }
                        echo $out;
                      ?>
                      </select>
                    </div>
                    <div class="col-sm-1 plr0">
                      <input class="form-control text-right" id="frequency_black_white_radio" type="number" name="frequency.person_no" min="0" step="1" value="<?php  
                        if ($bwList['ConditionFrequency'] == 'white') {
                          $condition = 'ConditionFrequency';
                          $frequency = $conditions['ConditionFrequency']; 
                          if (isset($frequency[0]) && $frequency[0]['mode'] == 3) {
                            echo $frequency[0]['frequency'];
                          } else { echo "0"; }
                        } else { echo "0"; }
                      ?>">
                    </div>
                    <div class="col-sm-1">
                      <p class="form-control-static"><?=\Yii::t('solution', 'times')?></p>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="tab-pane fade" id="weather"> 
              <div class="row">
                <div class="col-sm-9">
                  <div class="form-group">
                    <label class="control-label col-sm-4">
                      <?=\Yii::t('solution', 'Temperature')?>：
                    </label>
                    <div class="col-sm-8">
                      <label class="radio-inline">
                        <input type="radio" name="weather_temperature.black_white_radio" value="1"
                  			<?php
                  				foreach ($weatherId[1] as $sub) {
                  					if (in_array($sub, $targetedWeather)) {
                  						echo 'checked';
                  						break;
                  					}
                  				}
                  			?>
                  			>
                        <?=\Yii::t('solution', 'yes')?>
                      </label>
                      <label class="radio-inline">
                        <input type="radio" name="weather_temperature.black_white_radio" value="0" 
                        <?php
            							$notTargeted = 'checked';
            							foreach ($weatherId[1] as $sub) {
            								if (in_array($sub, $targetedWeather)) {
            									$notTargeted = '';
            									break;
            								}
            							}
            							echo $notTargeted;
            						?>
            						>
                        <?=\Yii::t('solution', 'no')?>
                      </label>
                    </div>
                    <div class="col-sm-8 col-sm-offset-4">
                      <div class="row">
                        <div class="col-sm-12">
                          <p class="form-control-static"><?=\Yii::t('solution', 'real-time temperature')?>：</p>
                        </div>
            <?php
              foreach ($weather['温度'] as $tk => $v) {
                $id = $v['id'];
                $from = $v['bottom'];
                $top = $v['top'];
                $from == 0.00 && $range = (int)$top.'°C 以下';
                $top == 0.00 && $range = (int)$from.'°C 以上';
                $from && $top && $range = (int)$from.'°C ~ '.(int)$top.'°C';
		$checked = '';
		if (in_array($id, $targetedWeather)) {
			$checked = 'checked';
		}
                $check = <<<FINE
            <div class="col-sm-3">
                          <label class="checkbox-inline">
                            <input type="checkbox" name="weather_temperature[]" value="$id"  $checked>
                            $range
                          </label>
                        </div>
FINE;
                echo $check;
              }
            ?>
                      </div>
                    </div> 
                  </div>
                  <div class="form-group">
                    <label class="control-label col-sm-4">
                      <?=\Yii::t('solution', 'Humidity')?>：
                    </label>
                    <div class="col-sm-8">
                      <label class="radio-inline">
                        <input type="radio" name="weather_humidity.black_white_radio" value="1" 
			<?php
							foreach ($weatherId[2] as $sub) {
								if (in_array($sub, $targetedWeather)) {
									echo 'checked';
									break;
								}
							}
						?>
						>
                        <?=\Yii::t('solution', 'yes')?>
                      </label>
                      <label class="radio-inline">
                        <input type="radio" name="weather_humidity.black_white_radio" value="0" 
			<?php
				$notTargeted = 'checked';
				foreach ($weatherId[2] as $sub) {
					if (in_array($sub, $targetedWeather)) {
						$notTargeted = '';
						break;
					}
				}
				echo $notTargeted;
			?>
			>
                        <?=\Yii::t('solution', 'no')?>
                      </label>
                    </div>
                    <div class="col-sm-8 col-sm-offset-4">
                      <div class="row">
                        <div class="col-sm-12">
                          <p class="form-control-static"><?=\Yii::t('solution', 'humidity level')?>：</p>
                        </div>
	            <?php
	              foreach ($weather['湿度'] as $tk => $v) {
	                $id = $v['id'];
            			$checked = '';
            			if (in_array($id, $targetedWeather)) {
            				$checked = 'checked';
            			}
	                $range = $v['name'].' ('.(int)$v['bottom'].'% ~ '.(int)$v['top'].'%)';
	                $check = <<<FINE
	            <div class="col-sm-4">
	                          <label class="checkbox-inline">
	                            <input type="checkbox" name="weather_humidity[]" value="$id"  $checked>
	              $range
	                          </label>
	                        </div>
FINE;
	                echo $check;
	              }
		    ?>
                      </div>
                    </div>
                  </div>
                  <div class="form-group">
                    <label class="control-label col-sm-4">
                      <?=\Yii::t('solution', 'Air quality')?>：
                    </label>
                    <div class="col-sm-8">
                      <label class="radio-inline">
                        <input type="radio" name="weather_aqi.black_white_radio" value="1"
                  			<?php
                  				foreach ($weatherId[3] as $sub) {
                  					if (in_array($sub, $targetedWeather)) {
                  						echo 'checked';
                  						break;
                  					}
                  				}
                  			?>
                  			>
                        <?=\Yii::t('solution', 'yes')?>
                      </label>
                      <label class="radio-inline">
                        <input type="radio" name="weather_aqi.black_white_radio" value="0" 
                  			<?php
                  				$notTargeted = 'checked';
                  				foreach ($weatherId[3] as $sub) {
                  					if (in_array($sub, $targetedWeather)) {
                  						$notTargeted = '';
                  						break;
                  					}
                  				}
                  				echo $notTargeted;
                  			?>
                  			>
                        <?=\Yii::t('solution', 'no')?>
                      </label>
                    </div>
                    <div class="col-sm-8 col-sm-offset-4">
                      <div class="row">
                        <div class="col-sm-12">
                          <p class="form-control-static"><?=\Yii::t('solution', 'air quality level')?>：</p>
                        </div>
            <?php
              foreach ($weather['空气指数'] as $tk => $v) {
                $id = $v['id'];
            		$checked = '';
            		if (in_array($id, $targetedWeather)) {
            			$checked = 'checked';
            		}
                $from = $v['bottom'];
                $top = $v['top'];
                $from == 0.00 && $range = (int)$top.' 以下';
                $top == 0.00 && $range = (int)$from.' 以上';
                $from && $top && $range = (int)$from.' ~ '.(int)$top;
                $range = $v['name'].' ('.$range.')';
                $check = <<<FINE
                  <div class="col-sm-4">
                          <label class="checkbox-inline">
                            <input type="checkbox" name="weather_aqi[]" value="$id" $checked>
              $range
                          </label>
                        </div>
FINE;
                echo $check;
              }
            ?>                        
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="tab-pane fade" id="crowd">
              <div class="row">
                <div class="col-sm-11">
                  <div class="form-group">
                    <label class="control-label col-sm-4" for="target_crowd_type" >
                      <?=\Yii::t('solution', 'Select Audience')?>：
                    </label>
                    <div class="col-sm-8">
                      <label class="radio-inline">
                        <input type="radio" class="audience_class" name="audience_class" value="0" <?php if($bwList['ConditionAudience'] == 'no_limit') echo "checked"; ?>> <?=\Yii::t('solution', 'No Limit')?>
                      </label>
                      <label class="radio-inline">
                        <input type="radio" class="audience_class" name="audience_class" value="1" <?php if($bwList['ConditionAudience'] != 'no_limit' && $conditions['ConditionAudience'][0]['audience_client_id'] == 1) echo "checked"; ?>> <?=\Yii::t('solution', 'Common Audience')?>
                      </label>
                      <label class="radio-inline">
                        <input type="radio" class="audience_class" name="audience_class" value="2" <?php if($bwList['ConditionAudience'] != 'no_limit' && $conditions['ConditionAudience'][0]['audience_client_id'] == 2) echo "checked"; ?>> <?=\Yii::t('solution', 'MiaoZhen Audience')?>
                      </label>
                      <label class="radio-inline">
                        <input type="radio" class="audience_class" name="audience_class" value="3" <?php if($bwList['ConditionAudience'] != 'no_limit' && $conditions['ConditionAudience'][0]['audience_client_id'] == 3) echo "checked"; ?>> <?=\Yii::t('solution', 'Admaster Audience')?>
                      </label>
                      <!-- <div class="help-block">注：自有人群适合于各个流量渠道，其他人群，需选择相应流量渠道。</div> -->
                    </div>
                  </div>
                  <div id="crowd_miaozhen" class="row">
                    <div class="col-sm-5 col-sm-offset-2">
                      <ul id="crowd-miaozhen-target-tab" data-target="crowd-miaozhen-target-content" class="nav nav-tabs nav-justified crowd-target-tab">
                        <li class="active">
                          <a href="#miaozhen-crowd-age" data-target="miaozhen-crowd-age" data-toggle="tab"><?=\Yii::t('solution', 'Age')?></a>
                        </li>
                        <li class="">
                          <a href="#miaozhen-crowd-hobby" data-target="miaozhen-crowd-hobby" data-toggle="tab"><?=\Yii::t('solution', 'Interests')?></a>
                        </li>
                      </ul>
                      <div id="crowd-miaozhen-target-content" class="tab-content crowd-target-content">
                        <div class="tab-pane fade active in" id="miaozhen-crowd-age">
                          <div class="col-sm-12 pl0 pr0">
                            <div id="miaozhen_age_select" data-url="<?=Url::to(['get-audience-category'])?>"></div>
                          </div>
                        </div>
                        <div class="tab-pane fade" id="miaozhen-crowd-hobby">
                          <div class="col-sm-12 pl0 pr0">
                            <div id="miaozhen_hobby_select" data-url="<?=Url::to(['get-audience-category'])?>"></div>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="col-sm-4 col-sm-offset-1" style="border:1px solid #ddd;">
                      <div class="col-sm-12" style="margin: 10px 0;">
                        <div class="form-group">
                          <select class="form-control" name='audience_bw_list'>
                            <option value="1" <?php if($bwList['ConditionAudience'] == 'white') echo "selected"; ?>><?=\Yii::t('solution', 'Include')?></option>
                            <option value="0" <?php if($bwList['ConditionAudience'] == 'black') echo "selected"; ?>><?=\Yii::t('solution', 'Declude')?></option>
                          </select>
                        </div>
                        <div class="form-group">
                          <label class="control-label col-sm-3"><?=\Yii::t('solution', 'Gender')?>:</label>
                          <div class="col-sm-9">
                            <label class="checkbox-inline">
                              <input type="checkbox" class="audience_sex_class" name="audience_category[2][]" value="425" <?php if(in_array(425, $targetedAudience)) echo "checked"; ?>> <?=\Yii::t('solution', 'All')?>
                            </label>
                            <label class="checkbox-inline">
                              <input type="checkbox" class="audience_sex_class" name="audience_category[2][]" value="426" <?php if(in_array(426, $targetedAudience)) echo "checked"; ?>> <?=\Yii::t('solution', 'Male')?>
                            </label>
                            <label class="checkbox-inline">
                              <input type="checkbox" class="audience_sex_class" name="audience_category[2][]" value="427" <?php if(in_array(427, $targetedAudience)) echo "checked"; ?>> <?=\Yii::t('solution', 'Female')?>
                            </label>
                          </div>
                        </div>
                        <div class="form-group">
                          <select class="form-control" multiple size="14" id="crowd-miaozhen-target-lab" name="audience_target_lab">
							<?php
								$audienceDiv = '';
								foreach($targetedAudience as $ta) {
									if (!$ta) continue;
									if (in_array($ta, [425, 426, 427])) continue;
									$selected = '';
									if (isset($clientAudienceType['all'][1][$ta])) {
										$selected = "selected";
										$audienceDiv .= <<<FINE
										
							<option value="$ta" $selected>{$clientAudienceType['all'][1][$ta]}</option>
FINE;
									}
								}
								echo $audienceDiv;
							?>
                          </select>
                          <input class="hidden" id="crowd-miaozhen-target-id" type="text" name="audience_category[2][]" value="<?php $value = array_diff ($targetedAudience, [424,425,426,427]); echo implode($value, ','); ?>">
                        </div>
                      </div>
                    </div>
                  </div>
                  <div id="crowd_admaster" class="row">
                    <div class="col-sm-5 col-sm-offset-2">
                      <ul id="crowd-admaster-target-tab" data-target="crowd-admaster-target-content" class="nav nav-tabs nav-justified crowd-target-tab">
                        <li class="active">
                          <a href="#admaster-crowd-population" data-target="admaster-crowd-population" data-toggle="tab"><?=\Yii::t('solution', 'People')?></a>
                        </li>
                        <li class="">
                          <a href="#admaster-crowd-media" data-target="admaster-crowd-media" data-toggle="tab"><?=\Yii::t('solution', 'Media Trend')?></a>
                        </li>
                        <li class="">
                          <a href="#admaster-crowd-category" data-target="admaster-crowd-category" data-toggle="tab"><?=\Yii::t('solution', 'Industry Trend')?></a>
                        </li>
                        <li class="">
                          <a href="#admaster-crowd-devices" data-target="admaster-crowd-devices" data-toggle="tab"><?=\Yii::t('solution', 'Device')?></a>
                        </li>
                      </ul>
                      <div id="crowd-admaster-target-content" class="tab-content crowd-target-content">
                        <div class="tab-pane fade active in" id="admaster-crowd-population">
                          <div class="col-sm-12 pl0 pr0">
                            <div id="admaster_population_select" data-url="<?=Url::to(['get-audience-category'])?>"></div>
                          </div>
                        </div>
                        <div class="tab-pane fade" id="admaster-crowd-media">
                          <div class="col-sm-12 pl0 pr0">
                            <div id="admaster_media_select" data-url="<?=Url::to(['get-audience-category'])?>"></div>
                          </div>
                        </div>
                        <div class="tab-pane fade" id="admaster-crowd-category">
                          <div class="col-sm-12 pl0 pr0">
                            <div id="admaster_category_select" data-url="<?=Url::to(['get-audience-category'])?>"></div>
                          </div>
                        </div>
                        <div class="tab-pane fade" id="admaster-crowd-devices">
                          <div class="col-sm-12 pl0 pr0">
                            <div id="admaster_devices_select" data-url="<?=Url::to(['get-audience-category'])?>"></div>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="col-sm-4 col-sm-offset-1" style="border:1px solid #ddd;">
                      <div class="col-sm-12" style="margin: 10px 0;">
                        <div class="form-group">
                          <select class="form-control" name='audience_bw_list'>
                            <option value="1" <?php if($bwList['ConditionAudience'] == 'white') echo "selected"; ?>><?=\Yii::t('solution', 'Include')?></option>
                            <option value="0" <?php if($bwList['ConditionAudience'] == 'black') echo "selected"; ?>><?=\Yii::t('solution', 'Declude')?></option>
                          </select>
                        </div>
                        <div class="form-group">
                          <label class="control-label col-sm-3"><?=\Yii::t('solution', 'Gender')?>:</label>
                          <div class="col-sm-9">
                            <label class="checkbox-inline">
                              <input type="checkbox" class="audience_sex_class" name="audience_category[3][]" value="430" <?php if(in_array(430, $targetedAudience)) echo "checked"; ?>> <?=\Yii::t('solution', 'All')?>
                            </label>
                            <label class="checkbox-inline">
                              <input type="checkbox" class="audience_sex_class" name="audience_category[3][]" value="431" <?php if(in_array(431, $targetedAudience)) echo "checked"; ?>> <?=\Yii::t('solution', 'Male')?>
                            </label>
                            <label class="checkbox-inline">
                              <input type="checkbox" class="audience_sex_class" name="audience_category[3][]" value="432" <?php if(in_array(432, $targetedAudience)) echo "checked"; ?>> <?=\Yii::t('solution', 'Female')?>
                            </label>
                          </div>
                        </div>
                        <div class="form-group">
                          <select class="form-control" multiple size="14" id="crowd-admaster-target-lab" name="audience_target_lab">
              <?php
                $audienceDiv = '';
                foreach($targetedAudience as $ta) {
                  if (!$ta) continue;
                  if (in_array($ta, [430, 431, 432])) continue;
				  $selected = '';
				if (isset($clientAudienceType['all'][2][$ta])) {
					$selected = "selected";
					$audienceDiv .= <<<FINE
                    
              <option value="$ta" $selected>{$clientAudienceType['all'][2][$ta]}</option>
FINE;
					}
				}
                echo $audienceDiv;
              ?>
                          </select>
                          <input class="hidden" id="crowd-admaster-target-id" type="text" name="audience_category[3][]" value="<?php $value = array_diff ($targetedAudience, [429,430,431,432]); echo implode($value, ','); ?>">
                        </div>
                      </div>
                    </div>
                  </div>
                  <div id="crowd_own" class="row">
                    <div class="col-sm-5 col-sm-offset-2">
                      <ul id="crowd-target-tab" data-target="crowd-target-content" class="nav nav-tabs nav-justified crowd-target-tab">
                        <li class="active">
                          <a href="#crowd-identity" data-target="crowd-identity" data-toggle="tab"><?=\Yii::t('solution', 'Attributes')?></a>
                        </li>
                        <li class="">
                          <a href="#crowd-hobby" data-target="crowd-hobby" data-toggle="tab"><?=\Yii::t('solution', 'Interests')?></a>
                        </li>
                        <li class="">
                          <a href="#crowd-trend" data-target="crowd-trend" data-toggle="tab"><?=\Yii::t('solution', 'Intension')?></a>
                        </li>
                      </ul>
                      <div id="crowd-target-content" class="tab-content crowd-target-content">
                        <div class="tab-pane fade" id="crowd-identity">
                          <div class="col-sm-12 pl0 pr0">
                            <div id="identity_select" data-url="<?=Url::to(['get-audience-category'])?>"></div>
                          </div>
                        </div>
                        <div class="tab-pane fade" id="crowd-hobby">
                          <div class="col-sm-12 pl0 pr0">
                            <div id="hobby_select" data-url="<?=Url::to(['get-audience-category'])?>"></div>
                          </div>
                        </div>
                        <div class="tab-pane fade" id="crowd-trend">
                          <div class="col-sm-12 pl0 pr0">
                            <div id="trend_select" data-url="<?=Url::to(['get-audience-category'])?>"></div>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="col-sm-4 col-sm-offset-1" style="border:1px solid #ddd;">
                      <div class="col-sm-12" style="margin: 10px 0;">
                        <div class="form-group">
                          <select class="form-control" name='audience_bw_list'>
                            <option value="1" <?php if($bwList['ConditionAudience'] == 'white') echo "selected"; ?>><?=\Yii::t('solution', 'Include')?></option>
                            <option value="0" <?php if($bwList['ConditionAudience'] == 'black') echo "selected"; ?>><?=\Yii::t('solution', 'Declude')?></option>
                          </select>
                        </div>
                        <div class="form-group">
                          <label class="control-label col-sm-3"><?=\Yii::t('solution', 'Gender')?>:</label>
                          <div class="col-sm-9">
                            <label class="checkbox-inline">
                              <input type="checkbox" class="audience_sex_class" name="audience_category[1][]" value="406" <?php if(in_array(406, $targetedAudience)) echo "checked"; ?>> <?=\Yii::t('solution', 'All')?>
                            </label>
                            <label class="checkbox-inline">
                              <input type="checkbox" class="audience_sex_class" name="audience_category[1][]" value="407" <?php if(in_array(407, $targetedAudience)) echo "checked"; ?>> <?=\Yii::t('solution', 'Male')?>
                            </label>
                            <label class="checkbox-inline">
                              <input type="checkbox" class="audience_sex_class" name="audience_category[1][]" value="408" <?php if(in_array(408, $targetedAudience)) echo "checked"; ?>> <?=\Yii::t('solution', 'Female')?>
                            </label>
                          </div>
                        </div>
                        <div class="form-group">
                          <select class="form-control" multiple size="14" id="crowd-target-lab" name="audience_target_lab">
              <?php
                $audienceDiv = '';
                foreach($targetedAudience as $ta) {
                  if (!$ta) continue;
                  if (in_array($ta, [406, 407, 408])) continue;
				  $selected = '';
				if (isset($clientAudienceType['all'][0][$ta])) {
					$selected = "selected";
                  $audienceDiv .= <<<FINE
                    
              <option value="$ta" $selected>{$clientAudienceType['all'][0][$ta]}</option>
FINE;
					}
				}
                echo $audienceDiv;
              ?>
                          </select>
                          <input class="hidden" id="crowd-target-id" type="text" name="audience_category[1][]" value="<?php $value = array_diff ($targetedAudience, [405,406,407,408]); echo implode($value, ','); ?>">
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="tab-pane fade" id="retarget"> 
              <div class="row">
                <div class="col-sm-9">
                  <div class="form-group">
                    <label class="control-label col-sm-4">
                      <?=\Yii::t('solution', 'Select Retarget Type')?>：
                    </label>
                    <div class="col-sm-8">
                      <select class="form-control" name="retarget_type_id">
						<?php
							$out = '';
							foreach ($retargets as $retarget) {
								$id = $retarget['id'];
								$isSelected = '';
								if (count($targetedRetarget) && $id == $targetedRetarget['retarget_type_id'])
									$isSelected = 'selected= "selected"';
								$name = $retarget['name'];
								$out .=<<<FINE
									
                        <option value="$id" $isSelected>$name</option>
FINE;
  
              }
              echo $out;
            ?>
                      </select>
                    </div>
                  </div>
                  <div class="form-group">
                    <label class="control-label col-sm-4">
                      <?=\Yii::t('solution', 'Select Retarget Style')?>：
                    </label>
                    <div class="col-sm-8">
                      <label class="radio-inline">
                        <input type="radio" name="retarget_launch" value="no_limit"
                          <?php  
                              if ($bwList['ConditionRetarget'] == 'no_limit')
                                  echo 'checked';
                          ?>
                        >
			<?=\Yii::t('solution', 'no limit')?>
                      </label>
                      <label class="radio-inline">
                        <input type="radio" name="retarget_launch" value="white"			
                          <?php  
                              if ($bwList['ConditionRetarget'] == 'white')
                                  echo 'checked';
                          ?>
                        >
                        <?=\Yii::t('solution', 'retarget')?>
                      </label>
                      <label class="radio-inline">
                        <input type="radio" name="retarget_launch" value="black"
			<?php  
                              if ($bwList['ConditionRetarget'] == 'black')
                                  echo 'checked';
                          ?>
                        >
                        <?=\Yii::t('solution', 'Introduce Traffic')?>
                      </label>
                    </div> 
                  </div>
                  <div class="form-group">
                    <label class="control-label col-sm-4" for="">
                      <?=\Yii::t('solution', 'Add Retarget Label')?>：
                    </label>
                    <div class="col-sm-8">
						<select class="form-control" name="retarget_site_id">
              <option value="0" $isSelected> </option>
						<?php
							$out = '';
							foreach ($sites as $site) {
								$id = $site['id'];
								$isSelected = '';
								if (count($targetedRetarget) && $id == $targetedRetarget['retarget_site_id'])
									$isSelected = 'selected ';
								$tag = $site['tag'];
								$out .=<<<FINE
									
                        <option value="$id" $isSelected>$tag</option>
FINE;

              }
              echo $out;
            ?>
                      </select>
                    </div>
                  </div>
                </div>
              </div>
            </div>


            <!-- Letv URL -->
			<?php
				$status = 'no_limit';
				if (isset($bwList['ConditionUrl'])) $status = $bwList['ConditionUrl'];
				$limitChecked = '';
				$blackChecked = '';
				$whiteChecked = '';
				$status == 'no_limit' && $limitChecked = 'checked';
				$status == 'black' && $blackChecked = 'checked';
				$status == 'white' && $whiteChecked = 'checked';

				$letvTab = '';
				$targetType = \Yii::t('solution', 'Target type');
				$noLimit = \Yii::t('solution', 'no limit');
				$black = \Yii::t('solution', 'black');
				$white = \Yii::t('solution', 'white');
				$delete = \Yii::t('solution', 'Click to delete');
				$addUrl = \Yii::t('solution', 'Add URL').':';
				$all = \Yii::t('solution', 'Check All/Inverse');
				$letvUrl = \Yii::t('solution', 'Letv URL').':';
				$keywords = \Yii::t('solution', 'Please input keywords');
				$hint = '';
				$url = '';
				
				if (isset($conditions['ConditionUrl']) && $status != 'no_limit') {
					$url = array_pop($conditions['ConditionUrl']);
				}
				if ($status !== 'no_limit') {
					$letvTab = <<< FINE
    <div class="target_tab_panel tab-pane fade letv_tab_panel">
      <div class="row">
        <div class="col-sm-9">
          <div class="form-group">
            <label class="control-label col-sm-4">
              $targetType
            </label>
			<div class="col-sm-8">
			  <label class="radio-inline">
				<input type="radio" name="urls.black_white_radio" value="no_limit" $limitChecked>
			   $noLimit
			  </label>
			  <label class="radio-inline">
				<input type="radio" name="urls.black_white_radio" value="black" $blackChecked>
				$black
			  </label>
			  <label class="radio-inline">
				<input type="radio" name="urls.black_white_radio" value="white" $whiteChecked>
				$white
			  </label>
			</div>
          </div>
          <div class="form-group">
            <label class="control-label col-sm-4" for="target_letv_url">
              $addUrl
            </label>
            <div class="col-sm-8">
              <textarea class="form-control" name="urls" id="target_letv_url" rows="4" type="text" value="" placeholder="$keywords">$url</textarea>
              <div class="help-block">$hint</div>
            </div>
          </div>
        </div>
      </div>
    </div>
FINE;

					echo $letvTab;
				}
			?>

            <!-- 编辑回显-->
			<?php
				$status = 'no_limit';
				if (isset($bwList['ConditionChannel'])) $status = $bwList['ConditionChannel'];
				$limitChecked = '';
				$blackChecked = '';
				$whiteChecked = '';
				$status == 'no_limit' && $limitChecked = 'checked';
				$status == 'black' && $blackChecked = 'checked';
				$status == 'white' && $whiteChecked = 'checked';
				
				$channelTab = '';
				$targetType = \Yii::t('solution', 'Target type');
				$noLimit = \Yii::t('solution', 'no limit');
				$black = \Yii::t('solution', 'black');
				$white = \Yii::t('solution', 'white');
				$all = \Yii::t('solution', 'Check All/Inverse');
				$chanelList = \Yii::t('solution', 'Channel List');
				if ($status !== 'no_limit') {
					$channelTab = <<<FINE
			<div class="target_tab_panel tab-pane fade youtu_tab_panel"> 
              <div class="row">
                <div class="col-sm-12">
                  <div class="form-group">
                    <label class="control-label col-sm-3">
                      ${targetType}：
                    </label>
                    <div class="col-sm-9 pl0">
                      <label class="radio-inline">
                        <input type="radio" name="youtu.black_white_radio" value="no_limit" $limitChecked>
                       $noLimit
                      </label>
                      <label class="radio-inline">
                        <input type="radio" name="youtu.black_white_radio" value="black" $blackChecked>
                        $black
                      </label>
                      <label class="radio-inline">
                        <input type="radio" name="youtu.black_white_radio" value="white" $whiteChecked>
                        $white
                      </label>
                    </div>
                  </div>
                  <div class="form-group">
                    <div class="col-sm-9 col-sm-offset-3 pl0">
                      <label class="checkbox-inline">
                        <input class="youtu_channel_all" type="checkbox" value="all">
                        $all
                      </label>
                    </div>
                  </div>
                </div>
              </div>
              <div class="row youtu_channel_target_wrap">
                <div class="col-sm-12">
                  <div class="form-group">
                    <label class="col-sm-3 control-label">
                      ${chanelList}：
                    </label>
					<div class="col-sm-9">
FINE;
						$channelDiv = '';
						foreach ($youTu as $media => $channels) {
							$channelDiv .= <<<FINE
							  <div class="row">
								<div class="col-sm-12">
								  <p class="form-control-static bottom-solid-border"><strong>$media</strong></p>
								</div>
							  </div>
FINE;
							foreach ($channels as $channel => $cates) {
								$channelDiv .= <<<FINE
							  <div class="row">
								<div class="col-sm-12">
								  <p class="form-control-static bottom-dashed-border">{$channel}:</p>
								</div>
FINE;
								foreach ($cates as $cate) {									
									$selected = '';
									if ($bwList['ConditionChannel'] == 'no_limit') $selected = '';
									else if (in_array($cate['id'], $selectedChannels)) 
										$selected = 'checked';
									$channelDiv .= <<<FINE
										<div class="col-sm-2">
										  <label class="checkbox-inline">
											<input type="checkbox" name="youtu_channels[]" value="{$cate['id']}" $selected>
												{$cate['channel_name']}
										  </label>										
										</div>
FINE;
								}
								$channelDiv .= <<<FINE
							  </div>
FINE;
							}
						}
						$channelDiv .= <<<FINE
							</div>
						  </div>
						</div>
					  </div>
					</div>
FINE;
					echo $channelTab .= $channelDiv;
					
				}
			?>

                    
          </div>
          <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
              <div class="btn-form-group pull-right">
                <input class="operate-type" type="hidden" name="operate_type" value="save">
                <button type="submit" class="btn btn-primary save-btn" data-operate="save" data-loading-text="<i class='fa fa-spinner fa-spin'></i> <?=\Yii::t('common', 'Saving')?>..."><?=\Yii::t('common', 'Save')?></button>
                <button type="submit" class="btn btn-success save-next-btn" data-operate="save-next" data-loading-text="<i class='fa fa-spinner fa-spin'></i> <?=\Yii::t('common', 'Saving')?>...">
                  <?=\Yii::t('common', 'Save and Next')?>
                  <i class="fa fa-caret-right"></i>
                </button>
                <a href="<?php echo Url::to(['solution/solution-list']); ?>" class="btn btn-default">
                  <?=\Yii::t('common', 'Back')?>
                </a>
              </div>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>
<div id="strategy_target_hidden_wrap" class="hidden">
  <div class="youtu_target_panel" data-type="youtu_channel">
    <li class="target_nav">
      <a href="#youtu-channel-target" data-target="youtu-channel-target" data-toggle="tab" data-button="new-youtu-channel-target">
        <?=\Yii::t('solution', 'Add Youtu Channel')?>
        <button class="btn-link btn-sm tab-close youtu-tab-close" title="<?=\Yii::t('solution', 'Click to delete')?>">
          <i class="fa fa-times"></i>
        </button>
      </a>
    </li>
    <div class="target_tab_panel tab-pane fade youtu_tab_panel"> 
      <div class="row">
        <div class="col-sm-12">
          <div class="form-group">
            <label class="control-label col-sm-3">
              <?=\Yii::t('solution', 'Target type')?>：
            </label>
            <div class="col-sm-9 pl0">
              <label class="radio-inline">
                <input type="radio" name="youtu.black_white_radio" value="no_limit" checked="">
               <?=\Yii::t('solution', 'no limit')?>
              </label>
              <label class="radio-inline">
                <input type="radio" name="youtu.black_white_radio" value="black">
                <?=\Yii::t('solution', 'black')?>
              </label>
              <label class="radio-inline">
                <input type="radio" name="youtu.black_white_radio" value="white">
                <?=\Yii::t('solution', 'white')?>
              </label>
            </div>
          </div>
          <div class="form-group">
            <div class="col-sm-9 col-sm-offset-3 pl0">
              <label class="checkbox-inline">
                <input class="youtu_channel_all" type="checkbox" value="all">
                <?=\Yii::t('solution', 'Check All/Inverse')?>
              </label>
            </div>
          </div>
        </div>
      </div>
      <div class="row youtu_channel_target_wrap">
        <div class="col-sm-12">
          <div class="form-group">
            <label class="col-sm-3 control-label">
              <?=\Yii::t('solution', 'Channel List')?>：
            </label>
            <div class="col-sm-9">
              <?php
						$channelDiv = '';
						foreach ($youTu as $media => $channels) {
							$channelDiv .= <<<FINE
							  <div class="row">
								<div class="col-sm-12">
								  <p class="form-control-static bottom-solid-border"><strong>$media</strong></p>
								</div>
							  </div>
FINE;
							foreach ($channels as $channel => $cates) {
								$channelDiv .= <<<FINE
							  <div class="row">
								<div class="col-sm-12">
								  <p class="form-control-static bottom-dashed-border">{$channel}:</p>
								</div>
FINE;
								foreach ($cates as $cate) {
									$channelDiv .= <<<FINE
										<div class="col-sm-2">
										  <label class="checkbox-inline">
											<input type="checkbox" name="youtu_channels[]" value="{$cate['id']}">
												{$cate['channel_name']}
										  </label>										
										</div>
FINE;
								}
								$channelDiv .= <<<FINE

							  </div>
FINE;
							}
						}
						echo $channelDiv;
					?>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<!-- Letv URL -->
<div id="strategy_letv_target_hidden_wrap" class="hidden">
  <div class="letv_target_panel" data-type="letv_url">
    <li class="target_nav">
      <a href="#letv-url-target" data-target="letv-url-target" data-toggle="tab" data-button="new-letv-url-target">
        <?=\Yii::t('solution', 'Letv URL')?>
        <button class="btn-link btn-sm tab-close letv-tab-close" title="<?=\Yii::t('solution', 'Click to delete')?>">
          <i class="fa fa-times"></i>
        </button>
      </a>
    </li>
    <div class="target_tab_panel tab-pane fade letv_tab_panel">
      <div class="row">
        <div class="col-sm-9">
          <div class="form-group">
            <label class="control-label col-sm-4">
              <?=\Yii::t('solution', 'Target type')?>：
            </label>
            <div class="col-sm-8">
              <label class="radio-inline">
                <input id="" type="radio" name="urls.black_white_radio" value="no_limit" checked>
                <?=\Yii::t('solution', 'no limit')?>
              </label>
              <label class="radio-inline">
                <input id="" type="radio" name="urls.black_white_radio" value="black">
                <?=\Yii::t('solution', 'black')?>
              </label>
              <label class="radio-inline">
                <input id="" type="radio" name="urls.black_white_radio" value="white">
                <?=\Yii::t('solution', 'white')?>
              </label>
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-sm-4" for="target_letv_url">
              <?=\Yii::t('solution', 'Add URL')?>：
            </label>
            <div class="col-sm-8">
			<?php
				$url = \Yii::t('solution', 'Please input keywords');
				$hint = '';
				if (isset($conditions['ConditionUrl']) && $status != 'no_limit') {
					$url = array_pop($conditions['ConditionUrl']);
				}
				$urlDiv = <<<FINE
              <textarea class="form-control" id="target_letv_url" name="urls" rows="4" type="text" value="" placeholder="$url"></textarea>
              <div class="help-block">$hint</div>
FINE;
				echo $urlDiv;
			 ?>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<?php
  $nextUrl = Url::to(['pc-solution-resource-edit']);
  list($audienceIdentity, $audienceInteresting, $audienceTrend) = $clientAudienceType['self'];
  $hobbyData = $audienceInteresting;
  $trendData = $audienceTrend;
  $identityData = $audienceIdentity;
  list($mzAudienceAge, $mzAudienceHobby) = $clientAudienceType['mz'];
  $mzHobbyData = $mzAudienceHobby;
  $mzAgeData = $mzAudienceAge;
  list($adPeople, $adMedia, $adIndustry, $adDevice) = $clientAudienceType['ad'];
  $adPopulationData = $adPeople;
  $adMediaData = $adMedia;
  $adCategoryData = $adIndustry;
  $adDevicesData = $adDevice;
  $this->registerJs("VAM.setVar('NEXT_URL','$nextUrl');", View::POS_END);
  $this->registerJs("VAM.setVar('HOBBY_TARGET_DATA','$hobbyData');", View::POS_END);
  $this->registerJs("VAM.setVar('TREND_TARGET_DATA','$trendData');", View::POS_END);
  $this->registerJs("VAM.setVar('IDENTITY_TARGET_DATA','$identityData');", View::POS_END);
  $this->registerJs("VAM.setVar('M_HOBBY_TARGET_DATA','$mzHobbyData');", View::POS_END);
  $this->registerJs("VAM.setVar('M_AGE_TARGET_DATA','$mzAgeData');", View::POS_END);
  $this->registerJs("VAM.setVar('A_MEDIA_TARGET_DATA','$adMediaData');", View::POS_END);
  $this->registerJs("VAM.setVar('A_POPULATION_TARGET_DATA','$adPopulationData');", View::POS_END);
  $this->registerJs("VAM.setVar('A_CATEGORY_TARGET_DATA','$adCategoryData');", View::POS_END);
  $this->registerJs("VAM.setVar('A_DEVICES_TARGET_DATA','$adDevicesData');", View::POS_END);
  // 地域定向
  $geos = array_pop($conditions['ConditionZone']);
  ///// below is init js code/////
  $geojs = <<<GEO
	(function() {	
    VAM.fn.initData = function ($) {
  		geos = "$geos";	
  		geoArray = $("input[name='geo[]']").each(function(){
  			$(this).prop("checked", true);
  			value = $(this).val();
  			if(geos.indexOf(value) === -1) {
  				$(this).prop("checked", false);
  			}
        $(this).trigger('change');
  		});

GEO;


  if ($bwList['ConditionSchedule'] == 0) {
      $schedule = $conditions['ConditionSchedule'];
      if (isset($schedule[0])) {
        $schedule = explode(',', $schedule[0]);
        foreach ($schedule as $hour) {
          $geojs .= <<<SCH
          $("input[name='period[]'][value='$hour']").attr("checked", "checked");
          $("input[name='period[]'][value='$hour']").parent("label").addClass("active");
          $("input[name='period[]'][value='$hour']").parents(".btn-group").siblings(".weekdays").find("input").prop("checked", false);

SCH;
        }
      }
      if ($pauseWeekday) {
        foreach ($pauseWeekday as $day) {
          if ($day == 7) $day = 0;
          $geojs .= <<<SCH
            $('#week_'+$day).attr("checked", false);
            
SCH;
        }
      }
  }
///// end of init js code/////
  $geojs .= '
    };
  })();';

  $this->registerJs($geojs, View::POS_END);
?>
<script type="text/javascript" >
  requirejs(["<?= Yii::getAlias('@web/').Yii::$app->params['envDir'];?>/js/site.js"], function(common) {
    requirejs(["<?= Yii::getAlias('@web/').Yii::$app->params['envDir'];?>/js/solution/newPcSolutionTarget.js"]);
  });
</script>
